CREATE PROCEDURE StudentsSearch
@UIN VARCHAR(15) = '%',
@FirstName VARCHAR(30) = '%',
@LastName VARCHAR(30) = '%'
AS
BEGIN

Declare @SUIN VARCHAR(50) = '%'+@UIN+'%';
Declare @SFn VARCHAR(50) = '%'+@FirstName+'%';
Declare @SLn VARCHAR(50) = '%'+@LastName+'%';

select 
		AutoId,
		UIN,
		FirstName,
		LastName,
		Address1,
		Address2,
		City,
		State,
		Country,
		Zip,
		Phone,
		Email 
from Student where (UIN like @SUIN) AND (FirstName like @SFn) AND ( LastName like @SLn); 
END
